package com.easy.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.easy.common.bean.SysPermission;
import com.easy.common.bean.SysRole;
import com.easy.common.service.IRoleService;
import com.easy.user.mapper.RoleMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleService extends ServiceImpl<RoleMapper, SysRole> implements IRoleService {

    @Override
    public SysPermission insert(SysPermission permission) {
        return null;
    }

    @Override
    public SysPermission update(SysPermission permission) {
        return null;
    }

    @Override
    public int delete(Integer id) {
        return 0;
    }

    @Override
    public SysPermission getByID(Integer id) {
        return null;
    }

    @Override
    public IPage<SysPermission> getListByPage(IPage page, SysPermission permission) {
        return null;
    }

    @Override
    public List<SysPermission> getList(SysPermission permission) {
        return null;
    }

    @Override
    public int setStatus(Integer id) {
        return 0;
    }

    @Override
    public SysRole assignPermission(SysRole role) {
        return null;
    }

    @Override
    public List<SysPermission> getRolePermissions(SysRole role) {
        List<SysPermission> permissions=this.getBaseMapper().getRolePermissions(role.getId());
        role.setPermissions(permissions);
        return permissions;
    }
}
